package com.example.concurrent;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Test7 {

	public static void main(String[] args) {
		Thread t1 = new Thread("t1") {
			@Override
			public void run() {
				log.debug("enter sleep...");
				try {
					Thread.sleep(2000);
				} catch (InterruptedException e) {
					log.debug("wake up ....");
					e.printStackTrace();
				}
			}
		};
		t1.start();
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		log.debug("interrupt...");
		t1.interrupt();
		
		
		
		
		
		
		
		
		
	}
}
